﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;



namespace Infrastructure;
internal class MyDesignTimeDbContextFactory : IDesignTimeDbContextFactory<ApplicationDbContext>
{
    public ApplicationDbContext CreateDbContext(string[] args)
    {
        DbContextOptionsBuilder<ApplicationDbContext> builder = new();
        string connStr = @"Server=localhost;Database=test1;Trusted_Connection=True;";
        builder.UseSqlServer(connStr);
        return new ApplicationDbContext(builder.Options);
    }
}
